#ifndef MATHBOX_H
#define MATHBOX_H

#include "ship.h"
#include "water.h"

class MathBox
{
public:
	MathBox(Water* water, Ship* ship);
	~MathBox(void);

	void Step(double dt);

private:
	double ForceX(const double shipVelDimless, const double q);
	double ForceY(const double shipVelDimless, const double q, const double shipCourse);
	double TorgueZ(const double shipVelDimless, const double q, const double shipCourse);

	double DriftFunction(const double shipVelDimless, const double shipDrift,
		const double shipAngleVelDimless, const double q, const double shipCourse);

	double VelocityFunction(const double shipVelDimless, const double shipDrift,
		const double shipAngleVelDimless, const double q, const double shipCourse);

	double AngleVelFunction(const double shipVelDimless, const double shipDrift,
		const double shipAngleVelDimless, const double q, const double shipCourse);

	double QFunction(const double shipVelDimless, const double shipDrift, const double shipCourse);

	double CourseFunction(const double shipAngleVelDimless);

private:
	Water* water;
	Ship* ship;
	double m11, m22, m66;

};

#endif // MATHBOX_H
